﻿<!--
	@create by 
	@update by 
	@description 
-->
<div>
	<el-form-q :field-data="queryFields" :buttons="queryButtons"></el-form-q>
	<div class="yu-toolBar">

		<el-button-group>
			<el-button icon="plus" @click="addFn" v-if="checkPermission('create')">新增</el-button>
			<el-button icon="edit" @click="modifyFn" v-if="checkPermission('edit')">修改</el-button>
			<el-button icon="yx-bin" @click="deleteFn" v-if="checkPermission('delete')">删除</el-button>
			<el-button icon="document" @click="infoFn" v-if="checkPermission('detail')">查看</el-button>
		</el-button-group> <!-- v-if="checkPermission('detail')" -->
	</div>
	<el-table-x ref="reftable" :row-index="true" :radiobox="false" :base-params="baseParams" :data-url="dataUrl" :table-columns="tableColumns"
				:request-type="'POST'"></el-table-x>

	<!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应 width="650px" height="380px" -->
	<el-dialog-x :title="viewTitle[viewType]" :visible.sync="dialogVisible" width="650px" size="full" v-if="dialogVisible">
		<el-tabs v-model="baseTab" type="border-card">
			<el-tab-pane label="产品信息" name="first">
				<el-collapse v-model="expandCollapseName">
					<el-collapse-item title="基本信息" name="base">
						<el-form-x ref="baseRef" :group-fields="baseFields" :disabled="formDisabled" label-width="130px"></el-form-x>
					</el-collapse-item>
					<el-collapse-item title="贷款要素控制" name="loan">
						<el-form-x ref="loanRef" :group-fields="loanFields" :disabled="formDisabled" label-width="130px" ></el-form-x>
					</el-collapse-item>
				</el-collapse>
			</el-tab-pane>
		</el-tabs>
		<div class="yu-grpButton" v-show="formDisabled">
			<el-button type="primary" @click="dialogVisible = false" icon="yx-undo2">返回</el-button>
		</div>
		<div class="yu-grpButton" v-show="!formDisabled">
			<el-button type="primary" @click="submitForm" icon="check">保存</el-button>
			<el-button type="primary" @click="dialogVisible = false" icon="yx-undo2">取消</el-button>
		</div>
	</el-dialog-x>

	<el-dialog-x title="详情" :visible.sync="prdHisVis" size="full">
		<div id="prdHis"></div>
		<div class="yu-grpButton">
			<el-button type="primary" @click="cancelPrdHis" icon="yx-loop2">返回</el-button>
		</div>
	</el-dialog-x>

</div>
